#include "timeoperations.h"

#ifdef WIN32
	#include <Windows.h>
#else
	#include <sys/time.h>
#endif
#include <assert.h>

uint64 TimeOperations::getTimeInMilliSeconds()
{
#ifdef WIN32
	return (uint64) timeGetTime();
#else
    timeval timeValue;
    timezone timeZone;
    
    int error = gettimeofday(&timeValue, &timeZone);
    assert(!error);
    
    return (timeValue.tv_sec * 1000) + (timeValue.tv_usec / 1000);
#endif
}
